package com.pubinfo.passbook.common.model.bo.witeoff;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.pubinfo.passbook.common.model.bo.witeoff.subitem.MedicineOnJobOrRetireSubitem;
import com.pubinfo.passbook.common.model.dto.witeoff.MedicineOnJobOrRetireDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 在职医药/退休医药数据,接收前端报账单数据
 */
@Data
@ApiModel(value = "MedicineOnJobOrRetireBO", description = "在职医药/退休医药数据,接收前端报账单数据")
@JacksonXmlRootElement(localName = "item")
@NoArgsConstructor
public class MedicineOnJobOrRetireBO extends WiteoffBase implements Serializable {
  
  private static final long serialVersionUID = -3520339721214702403L;
  
  /**
   * 报账子单信息集合
   */
  @ApiModelProperty(value = "报账子单信息集合", required = true)
  @JacksonXmlElementWrapper(localName = "lineItems")
  @JacksonXmlProperty(localName = "lineItem")
  List<MedicineOnJobOrRetireSubitem> lineItems = new ArrayList<>();

  /**
   * 关联发票集合
   */
  //@ApiModelProperty(value = "关联发票id集合", required = true)
  //List<String> invoiceIds = new ArrayList<>();
  //
  @JacksonXmlElementWrapper(localName = "lineItems")
  @JacksonXmlProperty(localName = "lineItem")
  public List<MedicineOnJobOrRetireSubitem> getLineItems() {
    return lineItems;
  }


  //@JacksonXmlElementWrapper(localName = "invoiceIds")
  //@JacksonXmlProperty(localName = "invoiceId")
  //public List<String> getInvoiceIds() {
  //  return invoiceIds;
  //}
  
  public MedicineOnJobOrRetireBO(MedicineOnJobOrRetireDTO jobDTO) {
    BeanUtils.copyProperties(jobDTO, this);
  }
  
}
